package com.css.zfzx.sjcj.modules.hddcGeomorphySvyReProf.repository;

import com.css.zfzx.sjcj.modules.hddcGeomorphySvyReProf.repository.entity.HddcGeomorphysvyreprofEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author zyb
 * @date 2020-11-30
 */
public interface HddcGeomorphysvyreprofRepository extends JpaRepository<HddcGeomorphysvyreprofEntity, String> {
    @Modifying
    @Query(nativeQuery = true,value = "update hddc_geomorphysvyreprof set qualityinspection_status=:s,extends1=:str where uuid=:uuid")
    void updateStatus(String s, String str, String uuid);

    @Query(nativeQuery = true,value = "select * from hddc_geomorphysvyreprof where is_valid=1 and extends10=1 ")
    List<HddcGeomorphysvyreprofEntity> findByAll();

    HddcGeomorphysvyreprofEntity findByUuidAndIsValid(String id, String isValid);
}
